|
|
|
|
|
|
|
Figure 29.2
The elements that you can add to a Data
Report are in a separate section of the Toolbox. |
|
|
|
|
|
|
|
|
To add information to your report, you first draw the report control in the appropriate section of the report and then set its properties, just as you would with any other control. The controls that can be placed on a Data Report are shown in Table 29.1. |
|
|
|
|
| Table 29.1 Data Report Controls | | Control Icon | Control Name | Description |  | RptLabel | Specifies a label used to display text that is not data-bound, such as a column name or date printed |  | RptTextBox | Displays the contents of a database field |  | RptImage | Contains a picture or other graphic image, such as a company logo |  | RptLine | Enables you to draw lines on the reportfor example, to separate the different sections of the report |  | RptShape | Enables you to draw a variety of shapes on the control to highlight information or provide other visual effects |  | RptFunction | Allows you to place a field in the header or footer that contains one of several simple math functions, such as a total of all the values in a particular data field |
|
|
|
|
|
|
Adding Fields to the Detail Section |
|
|
|
|
|
|
|
|
Continue with the sample project by placing some fields on the report. Draw a RptTextBox object in the Detail section of DataReport1, just as you would draw a normal text box on a form. Notice that it appears with the word Unbound in it, meaning that it has not yet been assigned a data field to display. |
|
|
|
|
|
|
|
|
Press F4 to bring up the Properties window for the new text box. Change the name to something meaningful. For the example, rename the box txtTitle, because you will use the text box to display book titles. Next, enter the word Title in the DataField property to bind the |
|
|
|
|
|